<template>
  <!--多个 model-->
  <h1>多个 model</h1>
  <el-row>
    <el-col :span="2">姓名</el-col>
    <el-col :span="5">
      <el-input v-model="name" placeholder=""></el-input>
    </el-col>
  </el-row>
  <el-row>
    <el-col :span="2">年龄</el-col>
    <el-col :span="5">
      <el-input-number v-model="age1" placeholder=""></el-input-number>
      <el-input v-model="age1" placeholder=""></el-input>
    </el-col>
  </el-row>
</template>


<script setup lang="ts">
  import { ref } from 'vue'
  
  const name = defineModel('name')
  const age = defineModel('age', {
    type:  Number, 
    default: 0,
    required: true // 必填
  })
 
  const age1 = ref(0)
  
</script>